package service;

import bean.HygInfo;
import dao.HygInfoMapper;
import dao.StuInfoMapper;

import java.sql.SQLException;
import java.util.List;

/**
 * @author 李夏
 * @version 1.0
 */
public class HygInfoService {
    public static Integer queryHygScore(Integer i) throws SQLException {

        List<HygInfo> list= HygInfoMapper.queryHygByBuild(i);
        Integer count=0;
        for(HygInfo hygInfo:list){
            count+=hygInfo.getCheckSore();
        }
        return count;
    }

    public static Integer getHygOneBuild(Integer buildId) throws SQLException {
        return HygInfoMapper.getHygOneBuild(buildId);
    }

    public static Integer queryHygAllCount() throws SQLException {
        return HygInfoMapper.queryHygAllCount();

    }
}
